import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		Scanner input=new Scanner(System.in);
		
		while(input.hasNextDouble())
		{ double s=0.0001,eplison=0.0001,a=0;
			double x=input.nextDouble();
			if(x<0) System.out.println("NaN");
			if(x>=0){
					while(Math.pow(a, 2)<x&&(x-Math.pow(a, 2))>=eplison)
					{a=a+s;}
					System.out.printf("%.6f\n",a);
					}
		}
	}

}
